﻿// Fill out your copyright notice in the Description page of Project Settings.


#include "AbilitySystem/Data/AttributeInfo.h"

FStarrySkyAttributeInfo UAttributeInfo::FindAttributeInfoByTag(const FGameplayTag& AttributeTag,
	bool bLogNotFound) const
{
	for (const FStarrySkyAttributeInfo& Info : AttributeInformation)
	{
		if (Info.AttributeTag.MatchesTagExact(AttributeTag))
		{
			return Info;
		}
	}
	if (bLogNotFound)
	{
		UE_LOG(LogTemp, Error, TEXT("Can't find info for tag: %s"), *AttributeTag.ToString());
	}
	return FStarrySkyAttributeInfo();
}
